<template>
  <div>
    <Timeline style="padding: 20px">
      <TimelineItem :color="item.type" v-for="item in renewData" :key="item.id">
        <p class="time">{{ item.turnoverTime }}</p>
        <MdPreview editorId="renew_editorId" :modelValue="item.content" />
      </TimelineItem>
    </Timeline>
  </div>
</template>
<script setup>
const axios = inject("axios");
import { MdPreview } from "md-editor-v3";
import "md-editor-v3/lib/style.css";

const renewData = ref();
onMounted(() => {
  axios
    .post("renew/getRenew", { pageSize: 100 })
    .then((response) => {
      let res = response.data;
      if (res.msg == "成功") {
        renewData.value = res.data.records;
      }
    })
    .catch();
});
</script>
<style  scoped>
.time {
  font-size: 12px;
}
.title {
  font-weight: bold;
}
</style>